<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let num = 1000
        function timer() {
            num += 1000;
            setTimeout(function () {
                console.log(1);
            }, num);
            timer();
            return
        };
        // console.log(timer);
        timer();
        setTimeout(function () {
            console.log(1);
        }, num)
        // function each1(ary) {
        //     var i = 0;
        //     (function () {
        //         if (i > 3) {
        //             window.clearTimeout(Go)
        //             return false;
        //         }
        //         console.log(ary[i])
        //         i++
        //         var Go = window.setTimeout(arguments.callee, 1000)
        //     }())
        // }

        // window.setTimeout(function () { each1(["jak1", "jake2", "jak3", "jake4"]) }, 2000)
    </script>
</body>

</html>